package com.heraleign.mybatis.service;

import com.heraleign.mybatis.bean.Student;
import com.heraleign.mybatis.mapper.StuMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class StuService {
    @Resource
    StuMapper mapper;

    public Student getStuById(Long id){
        return mapper.getStuById(id);
    }

    public List<Student> selectAll(){
        return mapper.selectAll();
    }

    public List<Student> selectAgeLt40(){
        return mapper.selectAgeLt40();
    }

    public Student queryById(Long id){
        return mapper.queryById(id);
    }

}
